import { getToken } from '@/utils/auth'

const defaultSettings = require('../../settings.js')

let option = {
    size: 'mini',
    card: true,
    arrow: false,
    emptyBtn: false,
    submitBtn: false,
    labelWidth: "110",
    column: [{
            row: true,
            label: "小程序appid",
            prop: "applets_appid",
            rules: [{
                required: true,
                message: "请输入appid",
                trigger: "blur",
            }, ],
        },
        {
            row: true,
            label: "小程序appsecret",
            prop: "applets_appsecret"
        },
        {
            row: true,
            label: "商户号",
            prop: "mchid",
        },
        {
            row: true,
            label: "支付key",
            prop: "pay_key",
        },
        {
            row: true,
            label: "公众号appid",
            prop: "public_appid",
        },
        {
            row: true,
            label: "公众号appsecret",
            prop: "public_appsecret",
        },
        {
            row: true,
            label: "支付证书cert",
            prop: "certificate_cert",
            type: 'textarea',
            minRows: 5,

            span: 12,
            showWordLimit: true
        },
        // {
        //     row: true,
        //     label: "支付证书key",
        //     prop: "certificate_key",
        //     type: 'textarea',
        //     minRows: 5,

        //     span: 12,
        //     showWordLimit: true
        // },
        {
            span: 12,
            label: '测试',
            prop: 'certificate_key',

            formslot: true,
            labelslot: true,
            errorslot: true,
        },
    ],
}
let option2 = {
    size: 'mini',
    card: true,
    arrow: false,
    emptyBtn: false,
    submitBtn: false,
    labelWidth: "110",
    column: [{
            row: true,
            span: 12,
            label: "版本显示",
            prop: "edition",
            type: 'select',
            slot: true,
            dicData: [{
                    label: '过审版',
                    value: 1
                }, {
                    label: '运营版',
                    value: 2
                },

            ],
            rules: [{
                required: true,
                message: '请选择版本',
                trigger: 'change'
            }],
        },
        {
            row: true,
            label: "备案号",
            prop: "record_number",
            rules: [{
                required: true,
                message: "请输入备案号",
                trigger: "blur",
            }, ],
        },
        {
            row: true,
            label: "备案跳转",
            prop: "record_url",
            rules: [{
                required: true,
                message: "请输入备案跳转",
                trigger: "blur",
            }, ],
        },
        {
            tip: '只能上传jpg/png文件，且不超过2m',
            accept: 'image/jpeg,image/png',
            width: 170,
            data: {
                key: getToken()
            },

            label: '用户管理优惠劵图片',
            prop: 'index_coupong_img',
            type: 'upload',
            listType: 'picture-img',
            span: 12,
            row: true,
            propsHttp: {
                res: 'datas',
                url:'url'
            },
            action: defaultSettings.uploadImg,

        },
        // {
        //     row: true,
        //     label: "微信号码",
        //     prop: "wechat",
        // },
        // {
        //     row: true,
        //     label: "客服微信名字",
        //     prop: "wechat_name",
        // },







        // {
        //     span: 12,
        //     // row: true,
        //     label: "充值说明",
        //     prop: "recharge_explain",
        //     type: 'textarea'
        // },


        // {
        //     span: 12,
        //     label: '分销协议',
        //     prop: 'distribution_agreement',
        //     slot: true,
        //     formslot: true,
        //     labelslot: true,
        //     errorslot: true,
        // },


    ],
}

let option3 = {
    size: 'mini',
    card: true,
    arrow: false,
    emptyBtn: false,
    submitBtn: false,
    labelWidth: "110",
    column: [{
            row: true,
            label: "AppKey",
            prop: "app_key",
            rules: [{
                required: true,
                message: "请输入AppKey",
                trigger: "blur",
            }, ],
        },
        {
            row: true,
            label: "AppSecret",
            prop: "app_secret"
        },
        {
            row: true,
            label: "验证码签名",
            prop: "code_autograph"
        },
        {
            row: true,
            label: "验证码模板ID",
            prop: "code_template",
        },
        {
            row: true,
            label: "普通签名",
            prop: "ordinary_autograph",
        },
        {
            row: true,
            label: "普通模板ID",
            prop: "ordinary_template",
        },

    ],
}
export default {
    option,
    option2,
    option3
};
